package com.study.d004;

import javafx.application.Application;
import javafx.stage.Stage;

/**
 * 生命周期   init()----> start()--->stop()
 */
public class LifeCycle extends Application{
	public static void main(String[] args) {
		System.out.println("=" + Thread.currentThread().getName());
		launch(args);
	}

	@Override
	public void init() throws Exception {
		System.out.println("调用init(). =" + Thread.currentThread().getName() );
	}

	@Override
	public void start(Stage primaryStage) throws Exception {
		System.out.println("调用start().=" + Thread.currentThread().getName());
		primaryStage.show();
	}

	@Override
	public void stop() throws Exception {
		/**
		 * 窗口关闭时会调用
		 */
		System.out.println("调用stop().=" + Thread.currentThread().getName());
	}

}
